package com.tiyende.kash.loop.request

import org.json.JSONObject

/**
 * IHttpLoader
 * @Author wwdeng
 * @CreateTime: 2024/11/20 17:35
 * @Annotation：
 */
interface IHttpLoader {

    /**
     * POST方式请求
     *
     * @param url
     * @param params
     * @param callback
     */
    fun post(url: String, params: JSONObject, callback: IHttpCallback)

    /**
     * POST方式请求 (文件上传)
     *
     * @param filePath
     * @param callback
     */
    fun upload(filePath: String, callback: IHttpCallback)

    /**
     * POST方式请求 (提交埋点)
     *
     * @param url
     * @param params
     * @param callback
     */
    fun postPoint(url: String, params: JSONObject, callback: IHttpCallback)

    /**
     * 添加埋点
     *
     * @param eventName
     * @param remark
     * @param callback
     */
    fun addPoint(eventName: String, remark: String?, callback: IHttpCallback)

    /**
     * 设置请求tag
     */
    fun setTag(tag: Any)

    /**
     * 取消请求
     */
    fun cancelTag(tag: Any)
}